//
//  Utility.h
//  Project
//
//  Created by 本游网络 on 2017/12/8.
//  Copyright © 2017年 本游网络. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface Utility : NSObject

//! 是否是有效的字典
+ (BOOL)isValidDictionary:(id)object;
//! 是否是有效的数组
+ (BOOL)isValidArray:(id)object;
//! 是否是有效的字符串
+ (BOOL)isValidString:(id)object;
//! 是否是有效的Number
+ (BOOL)isValidNumber:(id)object;

+ (NSString *)currentWWANType;
//判断是否在审核
+ (BOOL)isAppInReview;
//判断电话号
+ (BOOL)isMobileNumber:(NSString *)phone;
//判断邮箱是否正确
+(BOOL)isEmailWithString:(NSString *)string;

+ (NSDictionary *)transformURLQuery:(NSString *)query;

+ (UITabBarController *)currentTabBarController;
+ (UINavigationController *)currentNavigationController;


typedef NS_ENUM(NSUInteger, BinaryUnit) {b, B, KB, MB, GB, TB, PB, ZB, YB};
//! 二进制单位转换
+ (NSString *)binaryUnitTransform:(long long)value withUnit:(BinaryUnit)unit;

//计算年龄
+(NSString *)dateToOld:(NSDate *)bornDate;

/**
 处理html标签

 @param string 传入带有标签的字符串
 @return 返回处理后字符
 */
+(NSString *)getZZwithString:(NSString *)string;

@end
